package com.mysite.seckill.message.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;

import com.mysite.seckill.commons.po.SeckillRecord;

@Mapper
public interface SeckillRecordMapper {

    @Insert("INSERT INTO seckill_record(user_id, activity_id, product_id, seckill_price, seckill_count, seckill_time) VALUES (#{userId}, #{activityId}, #{productId}, #{seckillPrice}, #{seckillCount}, #{seckillTime})")
    @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
    public int insertSeckillRecord(SeckillRecord record);
}
